package com.etoak.controller;


import javax.servlet.*;
import java.io.IOException;


public class HelloController implements Servlet {


    @Override
    public void init(ServletConfig config) throws ServletException {

    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        String name = req.getParameter("name");
        System.out.println("name=" + name);

        req.getRequestDispatcher("jsps/hello.jsp")
                .forward(req,res);
    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {

    }
}
